<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<center>
<form id="mainForm" method="post">
<input type="hidden" name="id" value="${domain.id}"/>
<table>
	<tr>
		<td>父节点：</td>
		<td>
			<input class="easyui-combotree" name="pid" value="${domain.id eq null?1:domain.pid}" data-options="url:'system/menu/listTree.do?type=2'" style="width:155px;"/>
		</td>
	</tr>
	<tr>
		<td>节点名：</td>
		<td>
			<input type="text" value="${domain.name }" class="easyui-validatebox" name="name" data-options="required:true"/>
		</td>
	</tr>
	<tr>
		<td>URL：</td>
		<td><input class="textbox" name="url" value="${domain.url }"/></td>
	</tr>
	<tr>
		<td>序号：</td>
		<td><input class="textbox" name="sort" value="${domain.sort }"/></td>
	</tr>
	<tr>
		<td>图标：</td>
		<td><input class="textbox" name="icon" value="${domain.icon }"/></td>
	</tr>
</table>
</form>
</center>
<script type="text/javascript">
function doSubmit() {
	var formData = $("#mainForm").serialize();
	if($("#mainForm").form("validate")) {
		$.ajax({
			type : 'POST',
			dataType : 'JSON',
			data : formData,
			url : "system/menu/saveOrUpdate.do",
			success : function(data) {
				$.messager.show({
					title:'提示信息',
					msg:data.msg,
					timeout:2000,
					showType:'slide'
				});
				$("#menu_list_treegird").treegrid('reload');
				$("#menu_edit_dialog").dialog('destroy');
			}
		});
	}
}
</script>
</body>
</html>
